/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.bridge.sub;

import java.util.Collection;
import java.util.Collections;
import ru.jSkyRoom.bridge.JSkyBridge;
import ru.jSkyRoom.interfaces.stub.Animation;
import ru.jSkyRoom.interfaces.sub.JSkyResponse;
import skyproc.Condition;
import skyproc.FormID;
import skyproc.INFO.Response;
import skyproc.genenums.EmotionType;

/**
 *
 * @author Rakev
 */
public class ResponseBridge extends JSkyBridge<Response> implements JSkyResponse {

    public ResponseBridge(Response rawObject) {
        super(rawObject);
    }

    @Override
    public EmotionType getEmotionType() {
        return getRawObject().getEmotionType();
    }

    @Override
    public void setEmotionType(EmotionType type) {
        getRawObject().setEmotionType(type);
    }

    @Override
    public int getEmotionValue() {
        return getRawObject().getEmotionValue();
    }

    @Override
    public void setEmotionValue(int val) {
        getRawObject().setEmotionValue(val);
    }

    @Override
    public String getResponseText() {
        return getRawObject().getResponseText();
    }

    @Override
    public void setResponseText(String text) {
        getRawObject().setResponseText(text);
    }

    @Override
    public String getActorNotes() {
        return getRawObject().getActorNotes();
    }

    @Override
    public void setActorNotes(String text) {
        getRawObject().setActorNotes(text);
    }

    @Override
    public Animation getIdleAnimationSpeaker() {
        FormID id = getRawObject().getIdleAnimSpeaker();
        return getFinderFactory().createAnimationFinder().find(id);
    }

    @Override
    public void setIdleAnimationSpeaker(Animation animation) {
        FormID id = getIdProducer().produce(animation);
        getRawObject().setIdleAnimSpeaker(id);
    }

    @Override
    public Animation getIdleAnimationListener() {
        FormID id = getRawObject().getIdleAnimListener();
        return getFinderFactory().createAnimationFinder().find(id);
    }

    @Override
    public void setIdleAnimationListener(Animation animation) {
        FormID id = getIdProducer().produce(animation);
        getRawObject().setIdleAnimListener(id);
    }

    @Override
    public Collection<Condition> getConditions() {
        Collection<Condition> result = getRawObject().getConditions();
        return Collections.unmodifiableCollection(result);
    }

    @Override
    public void addCondition(Condition condition) {
        getRawObject().addCondition(condition);
    }

    @Override
    public void removeCondition(Condition condition) {
        getRawObject().removeCondition(condition);
    }
}
